/********************************************/
  // Creation History
  // --------------------------------------------------------------
  //	Company:			HTHK
  //	NAME:				JobOptions.java
  //    Title   :			get the Job Data into a list box
  //	FUNCTION:
  //	BY:					Jet Tao
  //	DATE:				09/12/2003
  // --------------------------------------------------------------
/*********************************************/

package tss.options;

import java.util.ArrayList;
import java.sql.Connection;
import tss.common.Options2;

import tss.job.*;

/**
 * A Class class.
 * <P>
 * @author HTHK
 */
public class JobOptions
  extends Options2
{

  /**
   * Constructor
   */
  public JobOptions() {
      this.load();
  }

  @Override
protected ArrayList createOptions(Connection con)
    throws Exception
  {
      ArrayList options = new ArrayList();
      JobBean Job = JobProcess.createBean();
      Job.setJob_name("");
      JobBean[] Jobs = JobProcess.find(con,Job);
      for (int i=0; i<Jobs.length; i++)
      {
          Options2.Option option
          = new Options2.Option( Jobs[i].getJob_name(),
                                Jobs[i].getJob_name());
          options.add(i,option);
      }
      return options;
  }


}

